﻿using System;

[Flags]
public enum UGUIEventType : int
{
    OnPointerClick = 1 << 0,
    OnPointerDown = 1 << 1,
    OnPointerEnter = 1 << 2,
    OnPointerExit = 1 << 3,
    OnPointerUp = 1 << 4,

    OnInitializePotentialDrag = 1 << 5,
    OnBeginDrag = 1 << 6,
    OnDrag = 1 << 7,
    OnEndDrag = 1 << 8,
    OnDrop = 1 << 9,

    OnMove = 1 << 10,
    OnScroll = 1 << 11,

    OnSelect = 1 << 12,
    OnDeselect = 1 << 13,
    OnUpdateSelected = 1 << 14,

    OnSubmit = 1 << 15,
    OnCancel = 1 << 16,
}

public static class UGUIEventTypeConst
{
    public const UGUIEventType NoneEvent = (UGUIEventType)0;
    public const UGUIEventType AllEvents = (UGUIEventType)(-1);

    public const UGUIEventType PointerEvents = UGUIEventType.OnPointerClick | UGUIEventType.OnPointerDown | UGUIEventType.OnPointerEnter | UGUIEventType.OnPointerExit | UGUIEventType.OnPointerUp;
    public const UGUIEventType DragEvents = UGUIEventType.OnInitializePotentialDrag | UGUIEventType.OnBeginDrag | UGUIEventType.OnDrag | UGUIEventType.OnEndDrag | UGUIEventType.OnDrop;
    public const UGUIEventType SelectEvents = UGUIEventType.OnSelect | UGUIEventType.OnDeselect | UGUIEventType.OnUpdateSelected;
    public const UGUIEventType SubmitEvents = UGUIEventType.OnSubmit | UGUIEventType.OnCancel;
}